﻿using System;
using System.Collections.Generic;

using System.Text;
using QUANLYCHAMCONG.BL.Entities;
using QUANLYCHAMCONG.DAO.DAO;
using System.Data;

namespace QUANLYCHAMCONG.BL.BUS
{
    public class STAFFBUS
    {
        public STAFFBUS() { }
        public static bool Insert(STAFF nv)
        {
           STAFFDAO dao = new STAFFDAO();
            return dao.Insert(nv);
        }
        public static bool Insert(int? flag,STAFF nv)
        {
            STAFFDAO dao = new STAFFDAO();
            return dao.Insert(flag, nv);
        }
        public static bool Insert(bool co, STAFF nv)
        {
            STAFFDAO dao = new STAFFDAO();
            return dao.Insert(co, nv);
        }
        public static bool Update(STAFF nv)
        {
           STAFFDAO dao = new STAFFDAO();
            return dao.Update(nv);
        }
        public static bool Delete(STAFF nv)
        {
           STAFFDAO dao = new STAFFDAO();
            return dao.Delete(nv);
        }
        public static DataTable SelectAll()
        {
           STAFFDAO dao = new STAFFDAO();
            return dao.SelectALL();
        }
        public static DataTable SelectPK(STAFF nv)
        {
           STAFFDAO dao = new STAFFDAO();
            return dao.SelectByPK(nv);
        }
        public static string GetID()
        {
           STAFFDAO dao = new STAFFDAO();
            return "NV" + dao.GetID().ToString();
        }
        public static bool ExistsNumBerMachine(STAFF nv)
        {
            STAFFDAO dao = new STAFFDAO();
            return dao.ExistsNumBerMachine(nv);
        }
        public static bool ExistsNameMachine(STAFF nv)
        {
            STAFFDAO dao = new STAFFDAO();
            return dao.ExistsNameMachine(nv);
        }
        public static DataTable SelectbyGroupPB_CV(STAFF nv)
        {
            STAFFDAO dao = new STAFFDAO();
            return dao.SelectbyGroupPB_CV(nv);
        }
        public static DataTable CheckExitsStaff(STAFF nv)
        {
            STAFFDAO dao = new STAFFDAO();
            return dao.CheckExitsStaff(nv);
        }
        public static DataTable SelectFollowPB(STAFF nv)
        {
            STAFFDAO dao = new STAFFDAO();
            return dao.SelectFollowPB(nv);
        }
        public static DataTable PrintStaff()
        {
            STAFFDAO dao = new STAFFDAO();
            return dao.PrintStaff();
        }
    }

}
